package com.lianjia.sh.se.esb.spi.model.impl;

import com.lianjia.sh.se.esb.spi.model.Message;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

/**
 * 简单 消息实现
 *
 * @author yangjiangping
 * @since 2016 -07-15 15:50
 */
public class SimpleMessage implements Message {
    //消息唯一编号
    String msgUUId = UUID.randomUUID().toString().replaceAll("-","");

    //业务数据
    Object data;

    //项目类型
    String projectType;

    //服务类型（业务类型）
    String serviceType;

    //操作者员工号
    Integer operatorEmpNo;

    //操作者ip
    String operatorIp;

    //操作时间
    Date operateTime = new Date();

    //扩展数据
    Map<String,Object> extendData = new HashMap<>();

    public String getMsgUUId() {
        return msgUUId;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public String getProjectType() {
        return projectType;
    }

    public void setProjectType(String projectType) {
        this.projectType = projectType;
    }

    public String getServiceType() {
        return serviceType;
    }

    public void setServiceType(String serviceType) {
        this.serviceType = serviceType;
    }

    public Integer getOperatorEmpNo() {
        return operatorEmpNo;
    }

    public void setOperatorEmpNo(Integer operatorEmpNo) {
        this.operatorEmpNo = operatorEmpNo;
    }

    public String getOperatorIp() {
        return operatorIp;
    }

    public void setOperatorIp(String operatorIp) {
        this.operatorIp = operatorIp;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    @Override
    public Map<String, Object> getExtendData() {
        return extendData;
    }

    @Override
    public void setExtendData(Map<String, Object> extendData) {
        this.extendData = extendData;
    }

    @Override
    public void setMsgUUId(String msgUUId) {
        this.msgUUId = msgUUId;
    }

    @Override
    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }
}
